<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>IgH EtherCAT Master: ethernet.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">IgH EtherCAT Master
   &#160;<span id="projectnumber">1.5.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ethernet_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">ethernet.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Ethernet over EtherCAT (EoE).  
<a href="#details">More...</a></p>

<p><a href="ethernet_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a6e67793856d7614e89ecdf6bd55c59de"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a6e67793856d7614e89ecdf6bd55c59de">EOE_DEBUG_LEVEL</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:a6e67793856d7614e89ecdf6bd55c59de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the debug level of EoE processing.  <a href="#a6e67793856d7614e89ecdf6bd55c59de">More...</a><br /></td></tr>
<tr class="separator:a6e67793856d7614e89ecdf6bd55c59de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70c1d2d995c7441a4f6e24aa46c08939"><td class="memItemLeft" align="right" valign="top"><a id="a70c1d2d995c7441a4f6e24aa46c08939"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a70c1d2d995c7441a4f6e24aa46c08939">EC_EOE_TX_QUEUE_SIZE</a>&#160;&#160;&#160;100</td></tr>
<tr class="memdesc:a70c1d2d995c7441a4f6e24aa46c08939"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the EoE tx queue. <br /></td></tr>
<tr class="separator:a70c1d2d995c7441a4f6e24aa46c08939"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e63bd7f607fd32315eef69b1f66835f"><td class="memItemLeft" align="right" valign="top"><a id="a0e63bd7f607fd32315eef69b1f66835f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a0e63bd7f607fd32315eef69b1f66835f">EC_EOE_TRIES</a>&#160;&#160;&#160;100</td></tr>
<tr class="memdesc:a0e63bd7f607fd32315eef69b1f66835f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of tries. <br /></td></tr>
<tr class="separator:a0e63bd7f607fd32315eef69b1f66835f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a970fad1d21f02be260525eecca75dfea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a970fad1d21f02be260525eecca75dfea">ec_eoe_flush</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a970fad1d21f02be260525eecca75dfea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empties the transmit queue.  <a href="#a970fad1d21f02be260525eecca75dfea">More...</a><br /></td></tr>
<tr class="separator:a970fad1d21f02be260525eecca75dfea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c3f0cfe4de9ea263299cca79a514fe2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a0c3f0cfe4de9ea263299cca79a514fe2">ec_eoe_state_rx_start</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a0c3f0cfe4de9ea263299cca79a514fe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">State: RX_START.  <a href="#a0c3f0cfe4de9ea263299cca79a514fe2">More...</a><br /></td></tr>
<tr class="separator:a0c3f0cfe4de9ea263299cca79a514fe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb363618e311593a3ba9162d048b9c4a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#aeb363618e311593a3ba9162d048b9c4a">ec_eoe_state_rx_check</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:aeb363618e311593a3ba9162d048b9c4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">State: RX_CHECK.  <a href="#aeb363618e311593a3ba9162d048b9c4a">More...</a><br /></td></tr>
<tr class="separator:aeb363618e311593a3ba9162d048b9c4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9022acd1ebb43ff1cad0a079f58e1264"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a9022acd1ebb43ff1cad0a079f58e1264">ec_eoe_state_rx_fetch</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a9022acd1ebb43ff1cad0a079f58e1264"><td class="mdescLeft">&#160;</td><td class="mdescRight">State: RX_FETCH.  <a href="#a9022acd1ebb43ff1cad0a079f58e1264">More...</a><br /></td></tr>
<tr class="separator:a9022acd1ebb43ff1cad0a079f58e1264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b1876fbf6c3be4f5b8e432207b2b5e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a4b1876fbf6c3be4f5b8e432207b2b5e5">ec_eoe_state_tx_start</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a4b1876fbf6c3be4f5b8e432207b2b5e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">State: TX START.  <a href="#a4b1876fbf6c3be4f5b8e432207b2b5e5">More...</a><br /></td></tr>
<tr class="separator:a4b1876fbf6c3be4f5b8e432207b2b5e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4a0bc15df72c6d646fbcb9ad9e3d552"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#ac4a0bc15df72c6d646fbcb9ad9e3d552">ec_eoe_state_tx_sent</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:ac4a0bc15df72c6d646fbcb9ad9e3d552"><td class="mdescLeft">&#160;</td><td class="mdescRight">State: TX SENT.  <a href="#ac4a0bc15df72c6d646fbcb9ad9e3d552">More...</a><br /></td></tr>
<tr class="separator:ac4a0bc15df72c6d646fbcb9ad9e3d552"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d276523f5d753ec334b8b8e8f21d7e9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a6d276523f5d753ec334b8b8e8f21d7e9">ec_eoedev_open</a> (struct net_device *dev)</td></tr>
<tr class="memdesc:a6d276523f5d753ec334b8b8e8f21d7e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the virtual network device.  <a href="#a6d276523f5d753ec334b8b8e8f21d7e9">More...</a><br /></td></tr>
<tr class="separator:a6d276523f5d753ec334b8b8e8f21d7e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aead802b75eda8893b75fe909bf5250d3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#aead802b75eda8893b75fe909bf5250d3">ec_eoedev_stop</a> (struct net_device *dev)</td></tr>
<tr class="memdesc:aead802b75eda8893b75fe909bf5250d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the virtual network device.  <a href="#aead802b75eda8893b75fe909bf5250d3">More...</a><br /></td></tr>
<tr class="separator:aead802b75eda8893b75fe909bf5250d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cb83fb1b9325e98a1ad2f6c8b02c9ac"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a1cb83fb1b9325e98a1ad2f6c8b02c9ac">ec_eoedev_tx</a> (struct sk_buff *skb, struct net_device *dev)</td></tr>
<tr class="memdesc:a1cb83fb1b9325e98a1ad2f6c8b02c9ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmits data via the virtual network device.  <a href="#a1cb83fb1b9325e98a1ad2f6c8b02c9ac">More...</a><br /></td></tr>
<tr class="separator:a1cb83fb1b9325e98a1ad2f6c8b02c9ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66606d2d064e12129cc3a99c7e84fa74"><td class="memItemLeft" align="right" valign="top">struct net_device_stats *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a66606d2d064e12129cc3a99c7e84fa74">ec_eoedev_stats</a> (struct net_device *dev)</td></tr>
<tr class="memdesc:a66606d2d064e12129cc3a99c7e84fa74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets statistics about the virtual network device.  <a href="#a66606d2d064e12129cc3a99c7e84fa74">More...</a><br /></td></tr>
<tr class="separator:a66606d2d064e12129cc3a99c7e84fa74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a938c671559b99ddc9f09f689457ff2bf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a938c671559b99ddc9f09f689457ff2bf">ec_eoe_init</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe, <a class="el" href="globals_8h.html#a8d9ffff7dbe1babaa4786a63f2860d57">ec_slave_t</a> *slave)</td></tr>
<tr class="memdesc:a938c671559b99ddc9f09f689457ff2bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">EoE constructor.  <a href="#a938c671559b99ddc9f09f689457ff2bf">More...</a><br /></td></tr>
<tr class="separator:a938c671559b99ddc9f09f689457ff2bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44f532d9502383805937d7843240a0d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a44f532d9502383805937d7843240a0d0">ec_eoe_clear</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a44f532d9502383805937d7843240a0d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">EoE destructor.  <a href="#a44f532d9502383805937d7843240a0d0">More...</a><br /></td></tr>
<tr class="separator:a44f532d9502383805937d7843240a0d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a634e85c58d58049c893721b7bd27f217"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a634e85c58d58049c893721b7bd27f217">ec_eoe_send</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a634e85c58d58049c893721b7bd27f217"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a frame or the next fragment.  <a href="#a634e85c58d58049c893721b7bd27f217">More...</a><br /></td></tr>
<tr class="separator:a634e85c58d58049c893721b7bd27f217"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a236cd1c306b14db3c71ed94e233ee23b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a236cd1c306b14db3c71ed94e233ee23b">ec_eoe_run</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a236cd1c306b14db3c71ed94e233ee23b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs the EoE state machine.  <a href="#a236cd1c306b14db3c71ed94e233ee23b">More...</a><br /></td></tr>
<tr class="separator:a236cd1c306b14db3c71ed94e233ee23b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa96fc479a7b625718b2502a201563e44"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#aa96fc479a7b625718b2502a201563e44">ec_eoe_queue</a> (<a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:aa96fc479a7b625718b2502a201563e44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queues the datagram, if necessary.  <a href="#aa96fc479a7b625718b2502a201563e44">More...</a><br /></td></tr>
<tr class="separator:aa96fc479a7b625718b2502a201563e44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13b38b2204c153ade2d9c0b942cd49b1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a13b38b2204c153ade2d9c0b942cd49b1">ec_eoe_is_open</a> (const <a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:a13b38b2204c153ade2d9c0b942cd49b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the state of the device.  <a href="#a13b38b2204c153ade2d9c0b942cd49b1">More...</a><br /></td></tr>
<tr class="separator:a13b38b2204c153ade2d9c0b942cd49b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfb958afb1ae5c90c9753664345b3e59"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#abfb958afb1ae5c90c9753664345b3e59">ec_eoe_is_idle</a> (const <a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *eoe)</td></tr>
<tr class="memdesc:abfb958afb1ae5c90c9753664345b3e59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the idle state.  <a href="#abfb958afb1ae5c90c9753664345b3e59">More...</a><br /></td></tr>
<tr class="separator:abfb958afb1ae5c90c9753664345b3e59"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a69c3c873c239f69737af0785814c6665"><td class="memItemLeft" align="right" valign="top">static const struct net_device_ops&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ethernet_8c.html#a69c3c873c239f69737af0785814c6665">ec_eoedev_ops</a></td></tr>
<tr class="memdesc:a69c3c873c239f69737af0785814c6665"><td class="mdescLeft">&#160;</td><td class="mdescRight">Device operations for EoE interfaces.  <a href="#a69c3c873c239f69737af0785814c6665">More...</a><br /></td></tr>
<tr class="separator:a69c3c873c239f69737af0785814c6665"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Ethernet over EtherCAT (EoE). </p>

<p class="definition">Definition in file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a6e67793856d7614e89ecdf6bd55c59de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e67793856d7614e89ecdf6bd55c59de">&#9670;&nbsp;</a></span>EOE_DEBUG_LEVEL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EOE_DEBUG_LEVEL&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defines the debug level of EoE processing. </p>
<p>0 = No debug messages. 1 = Output warnings. 2 = Output actions. 3 = Output actions and frame data. </p>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00056">56</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a970fad1d21f02be260525eecca75dfea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a970fad1d21f02be260525eecca75dfea">&#9670;&nbsp;</a></span>ec_eoe_flush()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_flush </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Empties the transmit queue. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00232">232</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a0c3f0cfe4de9ea263299cca79a514fe2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c3f0cfe4de9ea263299cca79a514fe2">&#9670;&nbsp;</a></span>ec_eoe_state_rx_start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_state_rx_start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>State: RX_START. </p>
<p>Starts a new receiving sequence by queueing a datagram that checks the slave's mailbox for a new EoE datagram.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Use both devices. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00394">394</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="aeb363618e311593a3ba9162d048b9c4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb363618e311593a3ba9162d048b9c4a">&#9670;&nbsp;</a></span>ec_eoe_state_rx_check()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_state_rx_check </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>State: RX_CHECK. </p>
<p>Processes the checking datagram sent in RX_START and issues a receive datagram, if new data is available. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00415">415</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a9022acd1ebb43ff1cad0a079f58e1264"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9022acd1ebb43ff1cad0a079f58e1264">&#9670;&nbsp;</a></span>ec_eoe_state_rx_fetch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_state_rx_fetch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>State: RX_FETCH. </p>
<p>Checks if the requested data of RX_CHECK was received and processes the EoE datagram. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00446">446</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a4b1876fbf6c3be4f5b8e432207b2b5e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b1876fbf6c3be4f5b8e432207b2b5e5">&#9670;&nbsp;</a></span>ec_eoe_state_tx_start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_state_tx_start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>State: TX START. </p>
<p>Starts a new transmit sequence. If no data is available, a new receive sequence is started instead.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Use both devices. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00623">623</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="ac4a0bc15df72c6d646fbcb9ad9e3d552"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4a0bc15df72c6d646fbcb9ad9e3d552">&#9670;&nbsp;</a></span>ec_eoe_state_tx_sent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_state_tx_sent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>State: TX SENT. </p>
<p>Checks is the previous transmit datagram succeded and sends the next fragment, if necessary. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00698">698</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a6d276523f5d753ec334b8b8e8f21d7e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d276523f5d753ec334b8b8e8f21d7e9">&#9670;&nbsp;</a></span>ec_eoedev_open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_eoedev_open </td>
          <td>(</td>
          <td class="paramtype">struct net_device *&#160;</td>
          <td class="paramname"><em>dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens the virtual network device. </p>
<dl class="section return"><dt>Returns</dt><dd>Always zero (success). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>EoE net_device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00764">764</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="aead802b75eda8893b75fe909bf5250d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aead802b75eda8893b75fe909bf5250d3">&#9670;&nbsp;</a></span>ec_eoedev_stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_eoedev_stop </td>
          <td>(</td>
          <td class="paramtype">struct net_device *&#160;</td>
          <td class="paramname"><em>dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stops the virtual network device. </p>
<dl class="section return"><dt>Returns</dt><dd>Always zero (success). </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>EoE net_device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00786">786</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a1cb83fb1b9325e98a1ad2f6c8b02c9ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cb83fb1b9325e98a1ad2f6c8b02c9ac">&#9670;&nbsp;</a></span>ec_eoedev_tx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_eoedev_tx </td>
          <td>(</td>
          <td class="paramtype">struct sk_buff *&#160;</td>
          <td class="paramname"><em>skb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct net_device *&#160;</td>
          <td class="paramname"><em>dev</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Transmits data via the virtual network device. </p>
<dl class="section return"><dt>Returns</dt><dd>Zero on success, non-zero on failure. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">skb</td><td>transmit socket buffer </td></tr>
    <tr><td class="paramname">dev</td><td>EoE net_device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00808">808</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a66606d2d064e12129cc3a99c7e84fa74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66606d2d064e12129cc3a99c7e84fa74">&#9670;&nbsp;</a></span>ec_eoedev_stats()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct net_device_stats * ec_eoedev_stats </td>
          <td>(</td>
          <td class="paramtype">struct net_device *&#160;</td>
          <td class="paramname"><em>dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets statistics about the virtual network device. </p>
<dl class="section return"><dt>Returns</dt><dd>Statistics. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>EoE net_device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00860">860</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a938c671559b99ddc9f09f689457ff2bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a938c671559b99ddc9f09f689457ff2bf">&#9670;&nbsp;</a></span>ec_eoe_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_eoe_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="globals_8h.html#a8d9ffff7dbe1babaa4786a63f2860d57">ec_slave_t</a> *&#160;</td>
          <td class="paramname"><em>slave</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>EoE constructor. </p>
<p>Initializes the EoE handler, creates a net_device and registers it.</p>
<dl class="section return"><dt>Returns</dt><dd>Zero on success, otherwise a negative error code. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
    <tr><td class="paramname">slave</td><td>EtherCAT slave </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00104">104</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a44f532d9502383805937d7843240a0d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44f532d9502383805937d7843240a0d0">&#9670;&nbsp;</a></span>ec_eoe_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>EoE destructor. </p>
<p>Unregisteres the net_device and frees allocated memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00208">208</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a634e85c58d58049c893721b7bd27f217"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a634e85c58d58049c893721b7bd27f217">&#9670;&nbsp;</a></span>ec_eoe_send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_eoe_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a frame or the next fragment. </p>
<dl class="section return"><dt>Returns</dt><dd>Zero on success, otherwise a negative error code. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00254">254</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a236cd1c306b14db3c71ed94e233ee23b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a236cd1c306b14db3c71ed94e233ee23b">&#9670;&nbsp;</a></span>ec_eoe_run()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_run </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Runs the EoE state machine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00324">324</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="aa96fc479a7b625718b2502a201563e44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa96fc479a7b625718b2502a201563e44">&#9670;&nbsp;</a></span>ec_eoe_queue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_eoe_queue </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Queues the datagram, if necessary. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00352">352</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="a13b38b2204c153ade2d9c0b942cd49b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13b38b2204c153ade2d9c0b942cd49b1">&#9670;&nbsp;</a></span>ec_eoe_is_open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_eoe_is_open </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the state of the device. </p>
<dl class="section return"><dt>Returns</dt><dd>1 if the device is "up", 0 if it is "down" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00366">366</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<a id="abfb958afb1ae5c90c9753664345b3e59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfb958afb1ae5c90c9753664345b3e59">&#9670;&nbsp;</a></span>ec_eoe_is_idle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_eoe_is_idle </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ethernet_8h.html#a03b01351f25a9210938e676941427cf4">ec_eoe_t</a> *&#160;</td>
          <td class="paramname"><em>eoe</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the idle state. </p>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>The device is idle. </td></tr>
    <tr><td class="paramname">0</td><td>The device is busy. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoe</td><td>EoE handler </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00378">378</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a69c3c873c239f69737af0785814c6665"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69c3c873c239f69737af0785814c6665">&#9670;&nbsp;</a></span>ec_eoedev_ops</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const struct net_device_ops ec_eoedev_ops</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line">    .ndo_open = <a class="code" href="ethernet_8c.html#a6d276523f5d753ec334b8b8e8f21d7e9">ec_eoedev_open</a>,</div><div class="line">    .ndo_stop = <a class="code" href="ethernet_8c.html#aead802b75eda8893b75fe909bf5250d3">ec_eoedev_stop</a>,</div><div class="line">    .ndo_start_xmit = <a class="code" href="ethernet_8c.html#a1cb83fb1b9325e98a1ad2f6c8b02c9ac">ec_eoedev_tx</a>,</div><div class="line">    .ndo_get_stats = <a class="code" href="ethernet_8c.html#a66606d2d064e12129cc3a99c7e84fa74">ec_eoedev_stats</a>,</div><div class="line">}</div><div class="ttc" id="ethernet_8c_html_a1cb83fb1b9325e98a1ad2f6c8b02c9ac"><div class="ttname"><a href="ethernet_8c.html#a1cb83fb1b9325e98a1ad2f6c8b02c9ac">ec_eoedev_tx</a></div><div class="ttdeci">int ec_eoedev_tx(struct sk_buff *, struct net_device *)</div><div class="ttdoc">Transmits data via the virtual network device. </div><div class="ttdef"><b>Definition:</b> <a href="ethernet_8c_source.html#l00808">ethernet.c:808</a></div></div>
<div class="ttc" id="ethernet_8c_html_a6d276523f5d753ec334b8b8e8f21d7e9"><div class="ttname"><a href="ethernet_8c.html#a6d276523f5d753ec334b8b8e8f21d7e9">ec_eoedev_open</a></div><div class="ttdeci">int ec_eoedev_open(struct net_device *)</div><div class="ttdoc">Opens the virtual network device. </div><div class="ttdef"><b>Definition:</b> <a href="ethernet_8c_source.html#l00764">ethernet.c:764</a></div></div>
<div class="ttc" id="ethernet_8c_html_aead802b75eda8893b75fe909bf5250d3"><div class="ttname"><a href="ethernet_8c.html#aead802b75eda8893b75fe909bf5250d3">ec_eoedev_stop</a></div><div class="ttdeci">int ec_eoedev_stop(struct net_device *)</div><div class="ttdoc">Stops the virtual network device. </div><div class="ttdef"><b>Definition:</b> <a href="ethernet_8c_source.html#l00786">ethernet.c:786</a></div></div>
<div class="ttc" id="ethernet_8c_html_a66606d2d064e12129cc3a99c7e84fa74"><div class="ttname"><a href="ethernet_8c.html#a66606d2d064e12129cc3a99c7e84fa74">ec_eoedev_stats</a></div><div class="ttdeci">struct net_device_stats * ec_eoedev_stats(struct net_device *)</div><div class="ttdoc">Gets statistics about the virtual network device. </div><div class="ttdef"><b>Definition:</b> <a href="ethernet_8c_source.html#l00860">ethernet.c:860</a></div></div>
</div><!-- fragment -->
<p>Device operations for EoE interfaces. </p>

<p class="definition">Definition at line <a class="el" href="ethernet_8c_source.html#l00088">88</a> of file <a class="el" href="ethernet_8c_source.html">ethernet.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c1346cf4828efdd0d2baf0d391d01b77.html">master</a></li><li class="navelem"><a class="el" href="ethernet_8c.html">ethernet.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
